package com.ruoyi.productstores.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.productstores.mapper.ProductstoresMapper;
import com.ruoyi.productstores.domain.Productstores;
import com.ruoyi.productstores.service.IProductstoresService;

/**
 * 商品商店关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-30
 */
@Service
public class ProductstoresServiceImpl implements IProductstoresService 
{
    @Autowired
    private ProductstoresMapper productstoresMapper;

    /**
     * 查询商品商店关联
     * 
     * @param productstoreId 商品商店关联主键
     * @return 商品商店关联
     */
    @Override
    public Productstores selectProductstoresByProductstoreId(Long productstoreId)
    {
        return productstoresMapper.selectProductstoresByProductstoreId(productstoreId);
    }

    /**
     * 查询商品商店关联列表
     * 
     * @param productstores 商品商店关联
     * @return 商品商店关联
     */
    @Override
    public List<Productstores> selectProductstoresList(Productstores productstores)
    {
        return productstoresMapper.selectProductstoresList(productstores);
    }

    /**
     * 新增商品商店关联
     * 
     * @param productstores 商品商店关联
     * @return 结果
     */
    @Override
    public int insertProductstores(Productstores productstores)
    {
        return productstoresMapper.insertProductstores(productstores);
    }

    /**
     * 修改商品商店关联
     * 
     * @param productstores 商品商店关联
     * @return 结果
     */
    @Override
    public int updateProductstores(Productstores productstores)
    {
        return productstoresMapper.updateProductstores(productstores);
    }

    /**
     * 批量删除商品商店关联
     * 
     * @param productstoreIds 需要删除的商品商店关联主键
     * @return 结果
     */
    @Override
    public int deleteProductstoresByProductstoreIds(Long[] productstoreIds)
    {
        return productstoresMapper.deleteProductstoresByProductstoreIds(productstoreIds);
    }

    /**
     * 删除商品商店关联信息
     * 
     * @param productstoreId 商品商店关联主键
     * @return 结果
     */
    @Override
    public int deleteProductstoresByProductstoreId(Long productstoreId)
    {
        return productstoresMapper.deleteProductstoresByProductstoreId(productstoreId);
    }
}
